<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" >
<head>
<title>Dashboard Service</title>
<link href="../Styles/Standard.css" rel="stylesheet" type="text/css" />
</head>
<body>
<table width="100%">
<tr>
<td width="200"><a href="http://www.ProMRDS.com"><img src="../Images/HomeIcon.gif" alt="ProMRDS Home Page" border="0" /></a></td>
<td width="*" align="center"><img src="Images/DashboardBanner.gif" alt="Dashboard" /></td>
</tr>
<tr>
<td colspan="2"><hr /></td>
</tr>
</table>

<div class="page">
<p class="heading"><span class="smallhead">Professional</span><br />&nbsp;&nbsp;&nbsp;Microsoft Robotics Developer Studio<br />
<a href="http://www.ProMRDS.com" onmouseout="Home.src='../Images/Home.gif';" onmouseover="Home.src='../Images/Home_f2.gif';"><img name="Home" src="../Images/Home.gif" width="150" height="25" border="0" alt="Home Page" /></a>
<a href="../ReadMe.htm" onmouseout="Contents.src='../Images/Contents.gif';" onmouseover="Contents.src='../Images/Contents_f2.gif';"><img name="Contents" src="../Images/Contents.gif" width="150" height="25" border="0" alt="Book Contents" /></a>
<a href="ReadMe.htm" onmouseout="ThisChapter.src='../Images/ThisChapter.gif';" onmouseover="ThisChapter.src='../Images/ThisChapter_f2.gif';"><img name="ThisChapter" src="../Images/ThisChapter.gif" width="150" height="25" border="0" alt="This Chapter" /></a>
</p>

<h1>Dashboard Service</h1>

<h2>Purpose</h2>
<p>
The Dashboard service provides a Graphical User Interface (GUI) to
control robots using the following generic contracts:
two-wheeled robots with a differential drive; robotic arms; and
web cameras.
</p>
<h2>Description</h2>
<p>
After using the Simple Dashboard a lot to
to drive robots around, it can be quite
annoying having to re-enter the same connection parameters every time.
This updated version of the Dashboard uses a config file and an InitialStatePartner
to reload saved settings on startup. There is also support
for a top-down view of the Laser Range Finder and a Webcam window.</p>
<img src="Images/Dashboard.jpg" align="left" hspace="10" vspace="10" alt="Dashboard" />
<p>
Here is what the new interface looks like. By default the
Laser Range Finder and the Articulated Arm are not displayed, so it will be a much smaller
window. It also remembers where you last placed it on the screen so that it will
always pop up in the same position.
The connection parameters and the log settings are remembered as well.
</p>
<p>
<b>NOTE:</b> You must select the <b>Save Settings</b> option in the File menu to save the settings.
This is intentional because you might want to change the settings temporarily and not
want them to be remembered every time you exit from the program.
</p>
<p>
When you save the settings, a file called Dashboard.Config.xml will be written
into the ProMRDS/Config directory.
</p>
<p>
There are Motion Control buttons in the middle-left of the Dashboard
that can be used to move the robot. These use the TranslateDistance
and RotateDegrees functions of the Differential Drive. For these to
work, the robot you are driving must have implemented these
operations.
You can adjust the distance and the amount of rotation in the Options
dialog.
</p>
<p>
At the bottom of the window you can see a new display option for the
Laser Range Finder data. This gives you a top-down view where black
pixels represent obstacles, white is free space and grey is
unknown. This is the convention that is commonly used in &quot;Occupancy
Grids&quot;. (The original 3D view is still available and can be
selected in the Options dialog.)
</p>
<br clear="all" />
<p>
&nbsp;
</p>
<img src="images/DashboardWebcamView.jpg" align="right" hspace="10" vspace="10" alt="Webcam View" />
<p>
In the list of available services you can see that there is a Webcam listed.
The Dashboard can display a separate window to view the video from a
Webcam attached to the robot. The example screenshot is from the
Maze Simulator.
</p>
<p>
Notice the red laser hits on the nearby obstacle. There are no laser
hits on the ball because it is not high enough. If you minimize
the simulation window these laser updates will stop.
</p>
<p>
If you resize the Webcam window, it will maintain the aspect ratio of the
image (unlike the Simulator window).
</p>
<br clear="all" />

<h3>Options Dialog</h3>
<img src="Images/DashboardOptions.jpg" align="left" hspace="10" vspace="10" alt="Dashboard Options" />
<p>
There are several different settings available in the Options Dialog.
They can be used to control how the "trackball" works.
This makes it easier to control the robot.
</p>
<p>
The scale factors allows you to control the speed of the robot as
you move the trackball further from the center. For example, you
might not want the robot to rotate at full speed because it is too fast
to control easily. Therefore you can set the Rotate Scale Factor
to 0.5 (half speed) or something suitable.
</p>
<p>
Note that you can reverse the direction of the trackball if you want
to fly your robot like a plane. Enter a negative value for the
Translate Scale Factor or Rotate Scale Factor to reverse the directions.
</p>
<p>The "Dead Zone" is an area either side of the horizontal and vertical
centrelines of the trackball where the value will be zero. This means
that you do not have to be so exact when you move the cursor. The
dead zone makes it easier to drive in a straight line and to rotate
on the spot.
</p>
<p>
There is a small problem with the dead zone that can cause the robot
to rotate in the wrong direction if you move the cursor too far below
the horizontal center line, i.e. just outside the dead zone. This same
problem exists in the original Simple Dashboard but it is even worse
because it has no dead zone at all so it is even more sensitive.
</p>
<p>Notice that you can turn the display of the LRF and Articulated Arm
on or off here. The Dashboard will adjust its size accordingly. This
makes it easier to fit on the screen at the same time as the Simulator
for example.
</p>
<p>If you are using the LRF, then you might want to set the Robot Width
(which is in millimeters). This will display any obstacle immediately in
front of the robot in red, rather than the normal blue-grey. Then it is
easier to see if the robot will fit through a gap. (This feature was
invented by Ben Axelrod.)</p>
<p>
If you check the Display Map option, then a top-down view will be
displayed as in the diagram above. If you uncheck it, the original
3D view is displayed. You can limit the maximum range used for the
laser data. For the simulated Pioneer robot, the maximum value is
8192 millimeters, but you can reduce this to limit what the laser sees.
</p>
<p>
The purpose of the Motion Commands options should be obvious. These
parameters are for the Motion Control buttons. The Power setting a
value from 0 to 1000 (which corresponds to the range of the trackball).
This is remapped to a power setting in the range of 0 to 1.0 before it
is sent to the robot.
</p>
<p>
Due to a bug in the original simulated Webcam service there is a timer setting
in the Dashboard options.
However, this is no longer necessary in the V1.5 Refresh. Don't set the
timer interval too low or your computer might not be able to
keep up.
</p>
<p>
If you change any of the settings, remember to save them from the File menu
before you shut down the Dashboard.
</p>
<br clear="all" />

<h2>Legal Stuff</h2>
<p>
The Dashboard service is a hack to the Microsoft Simple Dashboard. No rights are
claimed for the Microsoft portions of the code. It is not intended as a definitive example of
how to add an InitialStatePartner to a service, or to display data from
a Webcam, but it does work.
</p>
<p>
This code is available free of charge for non-commercial use.
Please see the <a href="../Licence.htm">Licence Agreement</a>.
</p>

</div>

<hr />
<div class="footer">
Page maintained by:
<a href="m&#97;&#105;&#108;t&#111;:webmaster&#64;promrds&#46;com">webmaster&#64;promrds.com</a><br />
Last Updated: Mar-2008
</div>

</body>
</html>
